<!--
 * @Author: Gary 289602025@qq.com
 * @Date: 2024-04-07 23:12:04
 * @LastEditors: Gary 289602025@qq.com
 * @LastEditTime: 2024-04-07 23:12:09
 * @FilePath: \vue3-test\bak\12_自定义事件\Father.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <h3>父组件</h3>
    <div>sonMsg:{{ sonMsg }}</div>
    <Son @send-toy="saveToy" />
  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue'
  import Son from './Son.vue'

  let sonMsg = ref('')

  function saveToy(value: string) {
    sonMsg.value = value
  }
</script>

<style>
</style>